function validate()
{
  oHobbies = document.getElementsByName('hobbies[]');
  var minCheck = 2;
  var count = 0;
  for(var i=0 ; i<oHobbies.length ; i++) {
    if(oHobbies[i].checked == true){
      count++;
    }    
  }
  if(count<minCheck ){
    alert('Please check atleast '+minCheck+' hobbbies');
    return false;
  }
}

function validate_()
{
  oHobbies = document.getElementsByName('hobbies[]');
  alert(oHobbies.length)
  for(var i=0 ; i<oHobbies.length ; i++) {
    alert(oHobbies[i].checked)  
  }
}
function validate____()
{
  oUname = document.register.uname;

  if(oUname.value == "") {
    alert("Please enter your name");
    oUname.focus();
    return false;
  }else if(oUname.value.length < 8) {
    alert("Please enter atleast 8 char of your name");
    oUname.focus();
    oUname.select();    
    return false;
  }

  return true;
}
